package com.d2rv.model;

import com.d2rv.offscreen.OffScreen3D;
import javax.media.opengl.GL;
import processing.core.PApplet;
import processing.core.PVector;

/**
 * Describes the user model
 *
 * @author Darrieutort A., Dupouy A., Rossignol L., Van Poucke A.
 */
public class UserModel extends ObjModel {

    /**
     * Default constructor.
     * @param parent the current application
     * @param path the path of the obj model
     */
    public UserModel(PApplet parent, String path) {
        super(parent, path, new PVector(0, 0, 0));
    }

    /**
     * Contains the methods to draw the model in the scene
     * @param parent the current offscreen
     */
    public void draw(OffScreen3D parent) {
        GL gl = parent.beginGL();
        parent.scale(this.scale.x, this.scale.y, this.scale.z);
        this.model.drawGL(gl);
        parent.endGL();
    }
}